<?php
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// |
// +----------------------------------------------------------------------

namespace app\model;

use think\Model;

class WithdrawalAuto extends Model
{
	protected $name               = 'withdrawal_auto';
	protected $autoWriteTimestamp = true;
	protected $insert             = [];
	protected $update             = [];

	const STATUS_WAIT     = 0; // 未完成
	const STATUS_COMPLETE = 1; // 已完成
	const STATUS_FAIL     = 2; // 失败
	const STATUS_CANCELED = 3; // 已撤销

	public function user()
	{
		return $this->belongsTo('User', 'user_id')
			->bind([
				'nickname' => 'nickname',
				'mobile'   => 'mobile',
			]);
	}
}
